package ex.com.jm.food.entity;

import java.io.Serializable;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
/**
 * 企业配送员实体
 * @author zhaojw
 *
 */
@Entity
@Table(name="jm_attendant")
public class Attendant implements Serializable {


	private static final long serialVersionUID = 1L;
	@Id
	@GenericGenerator(name="att_id",strategy="uuid")
	@GeneratedValue(generator="att_id")
	@Column(name="att_id",nullable=false,unique=true,length=32)
	private String attId;//主键
	@Column(name="att_name",nullable=false,length=32)
	private String attName;//配送员姓名
	@Column(name="att_address",nullable=false,length=32)
	private String attAddress;//配送区域
	@Column(name="status",nullable=false,length=2)
	private int status;//配送员目前是否在配送(1:配送中;0:空闲)
	@Column(name="com_id",nullable=false,length=32)
	private String comId;//所属企业id
	@Column(name="created",nullable=false,length=32)
	private String created;//创建时间
	@OneToMany(mappedBy="attId")
	private Set<Order> orders=new HashSet<Order>();
	public String getAttId() {
		return attId;
	}
	public void setAttId(String attId) {
		this.attId = attId;
	}
	public String getAttName() {
		return attName;
	}
	public void setAttName(String attName) {
		this.attName = attName;
	}
	public String getAttAddress() {
		return attAddress;
	}
	public void setAttAddress(String attAddress) {
		this.attAddress = attAddress;
	}
	public int getStatus() {
		return status;
	}
	public void setStatus(int status) {
		this.status = status;
	}
	public String getCreated() {
		return created;
	}
	public void setCreated(String created) {
		this.created = created;
	}
	public String getComId() {
		return comId;
	}
	public void setComId(String comId) {
		this.comId = comId;
	}
	public Set<Order> getOrders() {
		return orders;
	}
	public void setOrders(Set<Order> orders) {
		this.orders = orders;
	}

}
